home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / system-config-printer / troubleshoot / Welcome.pyc (.txt) < prev   
Python Compiled Bytecode  |  2009-10-28  |  3KB  |  51 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from base import *
  5. from timedops import TimedOperation
  6. import authconn
  7.  
  8. class AuthConnFactory:
  9.     
  10.     def __init__(self, parent):
  11.         self.parent = parent
  12.  
  13.     
  14.     def get_connection(self):
  15.         return authconn.Connection(self.parent, lock = True)
  16.  
  17.  
  18.  
  19. class Welcome(Question):
  20.     
  21.     def __init__(self, troubleshooter):
  22.         Question.__init__(self, troubleshooter, 'Welcome')
  23.         welcome = gtk.HBox()
  24.         welcome.set_spacing(12)
  25.         welcome.set_border_width(12)
  26.         image = gtk.Image()
  27.         image.set_alignment(0, 0)
  28.         image.set_from_stock(gtk.STOCK_PRINT, gtk.ICON_SIZE_DIALOG)
  29.         intro = gtk.Label('<span weight="bold" size="larger">' + _('Trouble-shooting Printing') + '</span>\n\n' + _('In the next few screens I will ask you some questions about your problem with printing. Based on your answers I will try to suggest a solution.') + '\n\n' + _("Click 'Forward' to begin."))
  30.         intro.set_alignment(0, 0)
  31.         intro.set_use_markup(True)
  32.         intro.set_line_wrap(True)
  33.         welcome.pack_start(image, False, False, 0)
  34.         welcome.pack_start(intro, True, True, 0)
  35.         page = troubleshooter.new_page(welcome, self)
  36.  
  37.     
  38.     def collect_answer(self):
  39.         parent = self.troubleshooter.get_window()
  40.         factory = AuthConnFactory(parent)
  41.         self.op = TimedOperation(factory.get_connection, parent = parent)
  42.         return {
  43.             '_authenticated_connection_factory': factory,
  44.             '_authenticated_connection': self.op.run() }
  45.  
  46.     
  47.     def cancel_operation(self):
  48.         self.op.cancel()
  49.  
  50.  
  51.